package com.budee.boke.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.budee.boke.dao.ArticleTypeMapper;
import com.budee.boke.model.ArticleType;
import com.budee.boke.service.ArticleTypeService;
@Service
public class ArticleTypeServiceImpl implements ArticleTypeService {
	@Autowired
	private ArticleTypeMapper  articleTypeDao;
	
	public void add(ArticleType articleType) {
		articleTypeDao.insert(articleType);

	}

	public void update(ArticleType articleType) {
		articleTypeDao.updateByPrimaryKey(articleType);

	}

	public void delete(int id) {
		articleTypeDao.deleteByPrimaryKey(id);

	}

	public ArticleType find(int id) {
		articleTypeDao.selectByPrimaryKey(id);
		return articleTypeDao.selectByPrimaryKey(id);
	}

}
